namespace Microsoft.Extensions.Configuration;

public static class AzureConfigurationExtensions
{
    public const string IsAzureHostingKey = "IsAzureHosting";

    /// <summary>
    /// 检索一个值，指示 <c>OrchardCore:IsAzureHosting</c> 配置键是否设置为 <see langword="true"/>。
    /// </summary>
    public static bool IsAzureHosting(
        this IConfiguration configuration) =>
        configuration.GetValue<bool>("OrchardCore:" + IsAzureHostingKey);
}
